 package com.gmrz.uaf.protocol.v1.schema;
 
 import com.google.gson.annotations.Expose;
 import com.gmrz.util.Convert;
 import java.util.Arrays;
 
 public class KeyID
 {
 
   @Expose
   byte[] id;
 
   public byte[] getId()
   {
     return this.id;
   }
 
   public void setId(byte[] id) {
     this.id = id;
   }
 
   public KeyID withId(byte[] id) {
     this.id = id;
     return this;
   }
 
   public String toString()
   {
     return Convert.toBase64(this.id);
   }
 
   public int hashCode()
   {
     return Arrays.hashCode(this.id);
   }
 
   public boolean equals(Object obj)
   {
     if (this == obj)
       return true;
     if (obj == null)
       return false;
     if (getClass() != obj.getClass())
       return false;
     KeyID other = (KeyID)obj;
     if (this.id == null) {
       if (other.id != null)
         return false;
     } else if (!Arrays.equals(this.id, other.id)) {
       return false;
     }
     return true;
   }
 }
